﻿@{
    Layout = null;
}
<script src="~/Scripts/MGJJS/Product/ProductType.js"></script>

@*产品分类*@

<div class="mtlr15">
    <div class="row">
        <div class="col-lg-8 col-md-8 col-sm-8" style="padding:0">
            <button type="button" class="btn btn-success" onclick="$.MGJ.ProductType.AddProductType()">
                <i class="glyphicon glyphicon-plus-sign"></i>
                新增
            </button>
            <button type="button" class="btn btn-success" onclick="$.MGJ.ProductType.GetExecl('#ProductTypeData')">
                <i class="glyphicon glyphicon-arrow-up"></i>
                导出excel
            </button>
        </div>

        <div class="col-lg-4 col-md-4 col-sm-4">
            <div class="input-group">
                <input type="text" class="form-control" id="prosearch" placeholder="类型名称" onkeydown="if (event.keyCode == 13) { $.MGJ.ProductType.GetProductTypeList(1); }">
                <span class="input-group-addon" onclick="$.MGJ.ProductType.GetProductTypeList(1)">
                    <span class="glyphicon glyphicon-search"></span>
                </span>
            </div>
        </div>
    </div>
    
    <div id="Table">
        <div class="overflow">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th width="15"><input type="checkbox" class="AllClickCheckbox"></th>
                        <th>类型名称</th>
                        <th>所属机构</th>
                        <th>备注</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="ProductTypeData" style="display:none;" binding="{'pageId':'ProductTypeP','pageCallback':'$.MGJ.ProductType.GetProductTypeList','emptyHtml':User_EmptyHtml}">
                    <tr>
                        <td width="15"><input type="checkbox" class="AllClickChild" binding="{'ID':'Id'}"></td>
                        <td binding="{'text':'TypeName'}"></td>
                        <td binding="{'text':'EnterpriseName','title':'EnterpriseName'}"></td>
                        <td binding="{'text':'Remark','title':'Remark'}">201</td>
                        <td binding="{'text':'ChangeDate','textHandle':'datetime_Date'}"></td>
                        <td>
                            <a binding="{'id':'Id'}" href="#" onclick="$.MGJ.ProductType.EditProductType(this)">编辑</a>
                            <a binding="{'id':'Id'}" href="#" onclick="$.MGJ.ProductType.DeleteProductType(this)">删除</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="ProductTypeP"></div>
    </div>
</div>

<script>
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.User_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    $(function () {
        $.MGJ.ProductType.GetProductTypeList(1);
    });
</script>


















